package planner.goals;

import java.util.ArrayList;
import java.util.Iterator;

public class Activity {

	private String name;
	private ArrayList<String> goals;
	private Iterator<String> goalIterator;
	
	public Activity (String name){		
		this.name = name;
		goals = new ArrayList<String>();		
	}
	
	public void addGoal(String g){
		goals.add(g);
	}
	
	public boolean hasNextGoal(){
		return goalIterator.hasNext();		
	}
	
	public String getNextGoal(){
		return goalIterator.next();
	}
	
	public void printActivity(){
		System.out.println("Activity Name: " + name);
		System.out.println("Goals:");
		
		Iterator<String> isg = goals.iterator();
		while (isg.hasNext()) {
			String g = isg.next();
			System.out.println(g);
		}
	}
	
	public void initSequence(){
		goalIterator = goals.iterator();
	}
	
	public String getName(){
		return name;
	}
	
}
